package net.itst.schwarzerdaumen;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class SchwarzerDaumenDatabase extends SQLiteOpenHelper {

    private static final String DB = "schwarzerdaumen.db";
    private static final int VERSION = 2;

    public SchwarzerDaumenDatabase(Context context) {
	super(context, DB, null, VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
	db.execSQL(TablePlants.SQL_CREATE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	db.execSQL("DROP TABLE IF EXISTS " + TablePlants.TABLE_NAME);
	onCreate(db);
    }

}
